package com.opo5.logisticsmanagement.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.opo5.logisticsmanagement.validationgroup.UpdateValida;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 
 * @TableName tbs_menu
 */
@TableName(value ="tbs_menu")
@Data
public class Menu implements Serializable {
    /**
     * 主键
     */
    @TableId
    @NotNull(groups = UpdateValida.class,message = "更新不能没有id")
    private Integer id;

    /**
     * 菜单名称
     */
    @NotBlank(message = "菜单名称不能为空")
    private String name;

    /**
     * 上级菜单id
     */
    private Integer parentId;

    /**
     * 图标
     */
    private String icon;

    /**
     * 组件
     */
    @NotBlank(message = "组件不能为空")
    private String component;

    /**
     * 路径
     */
    @NotBlank(message = "路径不能为空")
    private String path;

    /**
     * 序号
     */
    private Integer serialNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}